package it.polimi.swKnights.SWIMv2.ejb.messages;

import it.polimi.swKnights.SWIMv2.ejb.exceptions.InvalidLoginPrivilegesException;
import it.polimi.swKnights.SWIMv2.ejb.exceptions.LoginFailException;

import java.util.List;
import java.util.Map;

import javax.ejb.Remote;

@Remote
public interface MessageHandlerBeanRemote
{

	void persistMessage(String message, List<String> recipients, String sender,
			String password, String object) throws LoginFailException,
			InvalidLoginPrivilegesException;

	public List<Map<String, String>> getMessagesFromUser(String userName,
			String password) throws LoginFailException,
			InvalidLoginPrivilegesException;

	
	public int getMessagesCountFromUser(String userName, String password);
	

	public List<Map<String, String>> getMessageSentByUser(String user,
			String password) throws LoginFailException,
			InvalidLoginPrivilegesException;

	void setMessageAsRead(String recipient, String password, int id)
			throws LoginFailException, InvalidLoginPrivilegesException;

	Map<String, String> getMessage(String userName, String password, int id)
			throws LoginFailException, InvalidLoginPrivilegesException;

}
